<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<title>ARYTKUL</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="generator" content="Geany 0.21" />
	
	<style>
		input#nick {
					width: 179px;
			
		}
	
	
	
	</style>
	
</head>

<body>

<p>artykul</p>
<?PHP
	if (isset($_POST['tresc'])) {
		$tresc=file_get_contents('komentarze.txt');
		$nowyWpis =htmlentities ($_POST['nick']). "<br/>".htmlentities ($_POST['tresc']). "<hr/>";	

		file_put_contents('komentarze.txt',$tresc. $nowyWpis);

	}

	$tresc=file_get_contents('komentarze.txt');
	echo $tresc;


?>

	
	<form action="index.php" method="POST">
		<input type="text" id="nick" name="nick" value="nick" onclick="this.value=''"><br/>
		<textarea name="tresc" cols="20" rows="5" onclick="this.value=''">kommentarz</textarea>
		<br/>
		<input type="submit" value="dodaj komentarz!">

	</form>
</body>

</html>
